package com.hushao.aimi.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDateTime;
import java.util.List;


/**
 * @description: 商品VO
 * @author: 胡少
 * @create: 2018-06-06 17:03
 **/
@Data
@ApiModel(value = "商品信息")
public class ProductVo {
    private String id;

    @ApiModelProperty(value = "所属分类id")
    private String categoryId;

    @ApiModelProperty(value = "所属分类名称")
    private String categoryName;


    @ApiModelProperty(value = "所属分类的级联id")
    private Integer[] categoryIds;

    @ApiModelProperty(value = "商品名称")
    private String name;

    @ApiModelProperty(value = "商品编号")
    private String productCode;

    @ApiModelProperty(value = "商品副标题")
    private String subtitle;

    @ApiModelProperty(value = "商品图片")
    private List<String> subImage;

    @ApiModelProperty(value = "商品活动图片")
    private String recommendImage;

    @ApiModelProperty(value = "商品详细")
    private List<String> detail;

    @ApiModelProperty(value = "排序")
    private Integer sortOrder;

    @ApiModelProperty(value = "状态")
    private Integer status;

    private List<ProductSpecVo> productSpecs;

    private LocalDateTime createTime;
    private LocalDateTime updateTime;
    private String comment;



    public ProductVo(String id, String name, String subtitle, List<String>  subImage,  List<String> detail, List<ProductSpecVo> productSpecs) {
        this.id = id;
        this.name = name;
        this.subtitle = subtitle;
        this.subImage = subImage;
        this.detail = detail;
        this.productSpecs = productSpecs;
    }


    public ProductVo(String id, String name, String recommendImage) {
        this.id = id;
        this.name = name;
        this.recommendImage = recommendImage;
    }

    public ProductVo(String id,Integer [] categoryIds, String categoryName,String productCode, String name, String subtitle, List<String> subImage,  List<String> detail,  Integer sortOrder, int status, List<ProductSpecVo> productSpecs, LocalDateTime createTime, LocalDateTime updateTime, String comment) {
        this.id = id;
        this.categoryIds = categoryIds;
        this.categoryName = categoryName;
        this.productCode = productCode;
        this.name = name;
        this.subtitle = subtitle;
        this.subImage = subImage;
        this.detail = detail;
        this.sortOrder = sortOrder;
        this.status = status;
        this.productSpecs = productSpecs;
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.comment = comment;
    }
}
